﻿<%@ Page Title="" Language="C#" MasterPageFile="~/static.Master" AutoEventWireup="true"
    CodeBehind="Team.aspx.cs" Inherits="GS.Cricket.Web.Team" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="css/nonbootstrap.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder_Nav" runat="server">
    <ul class="nav">
        <li><a href="#">Home</a></li>
        <li class="active"><a href="Team.aspx">Team</a></li>
        <li><a href="Fixtures.aspx">Fixtures</a></li>
        <li><a href="PointsTable.aspx">Points Table</a></li>
    </ul>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <form id="form1" runat="server">
    <div id="wrapper">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <div class="row-fluid">
                    <div class="span3">
                        <h3>
                            Group</h3>
                        <asp:GridView ID="GroupGrid" runat="server" GridLines="None" ShowHeader="false" CssClass="table table-hover"
                            OnSelectedIndexChanged="GroupGrid_SelectedIndexChanged" DataKeyNames="Id">
                            <Columns>
                                <asp:BoundField DataField="Name" />
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <asp:HiddenField ID="Id" runat="server" Value='<%#Eval("Id") %>' />
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                            <SelectedRowStyle CssClass="gridSelectedRow" />
                        </asp:GridView>
                        <asp:Panel ID="Panel_GroupAdmin" runat="server">
                            <asp:TextBox ID="TextBox_AddGroup" runat="server" CssClass="span12" placeholder="Group Name"></asp:TextBox>
                            <asp:Button ID="Button_AddGroup" runat="server" Text="Add" CssClass="btn btn-info"
                                OnClick="Button_AddGroupClick" />
                            <asp:Button ID="Button_RenameGroup" runat="server" Text="Rename" CssClass="btn btn-info"
                                OnClick="Button_RenameGroupClick" />
                            <asp:LinkButton ID="Button_DeleteGroup" runat="server" CssClass="btn btn-danger"
                                OnClick="Button_DeleteGroupClick"><i class="icon-remove-sign icon-white"></i> Delete</asp:LinkButton>
                        </asp:Panel>
                        <div>
                            <asp:Label ID="Label_GroupError" runat="server" CssClass="control-label" for="inputError"></asp:Label>
                            <asp:Label ID="Label_GroupSuccess" runat="server" CssClass="control-label" for="inputSuccess"></asp:Label>
                        </div>
                    </div>
                    <div class="span4">
                        <h3>
                            Team</h3>
                        <asp:GridView ID="TeamGrid" runat="server" GridLines="None" ShowHeader="false" CssClass="table table-hover"
                            OnSelectedIndexChanged="TeamGrid_SelectedIndexChanged" DataKeyNames="Id">
                            <Columns>
                                <asp:BoundField DataField="Name" />
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <asp:HiddenField ID="Id" runat="server" Value='<%#Eval("Id") %>' />
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                            <SelectedRowStyle CssClass="gridSelectedRow" />
                        </asp:GridView>
                        <asp:Panel ID="Panel_TeamAdmin" runat="server">
                            <asp:TextBox ID="TextBox_AddTeam" runat="server" CssClass="span12" placeholder="Team Name"></asp:TextBox>
                            <asp:Button ID="Button_AddTeam" runat="server" Text="Add" CssClass="btn btn-info"
                                OnClick="Button_AddTeamClick" />
                            <asp:Button ID="Button_RenameTeam" runat="server" Text="Rename" CssClass="btn btn-info"
                                OnClick="Button_RenameTeamClick" />
                            <asp:LinkButton ID="Button_DeleteTeam" runat="server" CssClass="btn btn-danger" OnClick="Button_DeleteTeamClick"><i class="icon-remove-sign icon-white"></i> Delete</asp:LinkButton>
                            <div class="btn-group">
                                <button class="btn">
                                    Group</button>
                                <button class="btn dropdown-toggle" data-toggle="dropdown">
                                    <span class="caret"></span>
                                </button>
                                <ul class="dropdown-menu">
                                    <asp:Repeater ID="Repeater_Group" runat="server">
                                        <ItemTemplate>
                                            <li>
                                                <asp:HiddenField ID="LinkButton_AddToGroupId" runat="server" Value="" />
                                                <asp:LinkButton ID="LinkButton_AddToGroup" runat="server" OnCommand="Button_AddToGroup"
                                                    CommandArgument='<%# DataBinder.Eval(Container.DataItem, "Id") %>'>
                                            <%# DataBinder.Eval(Container.DataItem, "Name") %>
                                                </asp:LinkButton>
                                            </li>
                                        </ItemTemplate>
                                    </asp:Repeater>
                                </ul>
                            </div>
                            <div>
                                <asp:Label ID="Label_TeamError" runat="server" CssClass="control-label" for="inputError"></asp:Label>
                                <asp:Label ID="Label_TeamSuccess" runat="server" CssClass="control-label" for="inputSuccess"></asp:Label>
                            </div>
                        </asp:Panel>
                    </div>
                    <div class="span5">
                        <h3>
                            Players</h3>
                        <asp:GridView ID="PlayerGrid" runat="server" GridLines="None" ShowHeader="false"
                            CssClass="table table-hover" DataKeyNames="Id">
                            <Columns>
                                <asp:BoundField DataField="Name" />
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <asp:Label ID="Id" runat="server" Value='<%#Eval("Id") %>' />
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                            <SelectedRowStyle CssClass="gridSelectedRow" />
                        </asp:GridView>
                        <asp:Panel ID="Panel_PlayerAdmin" runat="server">
                            <asp:TextBox ID="TextBox_AddPlayer" runat="server" CssClass="span12" placeholder="Player Name"></asp:TextBox>
                            <asp:Button ID="Button_AddPlayer" runat="server" Text="Add" CssClass="btn btn-info"
                                OnClick="Button_AddPlayerClick" />
                            <asp:Button ID="Button_RenamePLayer" runat="server" Text="Rename" CssClass="btn btn-info"
                                OnClick="Button_RenamePlayerClick" />
                            <asp:LinkButton ID="Button_DeletePLayer" runat="server" CssClass="btn btn-danger"
                                OnClick="Button_DeletePlayerClick"><i class="icon-remove-sign icon-white"></i> Delete</asp:LinkButton>
                            <div class="btn-group">
                                <button class="btn">
                                    Team</button>
                                <button class="btn dropdown-toggle" data-toggle="dropdown">
                                    <span class="caret"></span>
                                </button>
                                <ul class="dropdown-menu">
                                    <asp:Repeater ID="Repeater_Team" runat="server">
                                        <ItemTemplate>
                                            <li>
                                                <asp:HiddenField ID="LinkButton_AddToTeamId" runat="server" Value="" />
                                                <asp:LinkButton ID="LinkButton_AddToTeam" runat="server" OnCommand="Button_AddToTeam"
                                                    CommandArgument='<%# DataBinder.Eval(Container.DataItem, "Id") %>'>
                                            <%# DataBinder.Eval(Container.DataItem, "Name") %>
                                                </asp:LinkButton>
                                            </li>
                                        </ItemTemplate>
                                    </asp:Repeater>
                                </ul>
                            </div>
                        </asp:Panel>
                        <div>
                            <asp:Label ID="Label_PlayerError" runat="server" CssClass="control-label" for="inputError"></asp:Label>
                            <asp:Label ID="Label_PlayerSuccess" runat="server" CssClass="control-label" for="inputSuccess"></asp:Label>
                        </div>
                    </div>
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    </form>
</asp:Content>
